﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="TaiKhoan.aspx.cs" Inherits="admin_TaiKhoan" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Untitled Page</title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
    <table border="0" cellspacing="0" cellpadding="0" width="100%">
    	<tr>
    		<td id="left" valign="top">
    		    <ul>    		        
    		        <li><a href="TaiKhoan.aspx">Thiết lập tài khoản</a></li>
    		        <li><a href="Sim.aspx">Thiết lập Sim</a></li>    		        
    		        <li><a href="Logout.aspx">Đăng xuất</a></li>
    		    </ul>
    		</td>
    		<td id="content" valign="top">
    		    <h2>Thay đổi mật khẩu</h2>
    		        <table border="0" cellspacing="5" cellpadding="0" width="300px">
    		    	    <tr>
    		    		    <td>Mật khẩu:</td> 
                            <td>   <asp:TextBox ID="txtPass" runat="server" TextMode="Password"></asp:TextBox></td>
    		    	    </tr>
    		    	    <tr>
    		    		    <td>Mật khẩu mới: </td> <td> <asp:TextBox ID="txtNewPass" runat="server" TextMode="Password"></asp:TextBox></td>
    		    	    </tr>
    		    	    <tr>
    		    		    <td>Gõ lại mật khẩu mới:</td> <td>  <asp:TextBox ID="txtRetype" runat="server" TextMode="Password"></asp:TextBox></td>
    		    	    </tr>
    		    	    <tr>
    		    		    <td colspan="2" align="right">
                                <asp:Button ID="Button1" runat="server" Text="Thay đổi" 
                                    onclick="Button1_Click" /></td>
    		    	    </tr>
    		        </table>
                <hr />
                <h2>Số điện thoại hot line</h2>
                <asp:TextBox ID="txtSoDienThoai" runat="server"></asp:TextBox>
                        <asp:Button ID="DoiDienThoai"
                    runat="server" Text="Cập nhật" onclick="DoiDienThoai_Click" />
                <hr />
                <h2>Danh sách yahoo hỗ trợ khách hàng</h2>
                Yahoo ID: <asp:TextBox ID="txtYahooID" runat="server" ></asp:TextBox>
                Điện thoại: 
                <asp:TextBox ID="txtYahooTel" runat="server" Width="85px"></asp:TextBox>
                <asp:Button ID="btnThemYahoo" runat="server" Text="Thêm" 
                    onclick="btnThemYahoo_Click" />
                <br /><br />
                <asp:GridView ID="GridView1" runat="server" AllowPaging="True" AllowSorting="True" 
                            AutoGenerateColumns="False" CellPadding="7" DataKeyNames="YID" 
                            DataSourceID="SqlDataSource1" ForeColor="#333333" GridLines="None">
                    <RowStyle BackColor="#EFF3FB" />
                    <Columns>
                        <asp:BoundField DataField="YID" HeaderText="YID" ReadOnly="True" 
                            SortExpression="YID" />
                        <asp:BoundField DataField="Tel" HeaderText="Điện Thoại" SortExpression="Tel" />
                                               
                        <asp:CommandField ButtonType="Button" ShowEditButton="true" />
                        <asp:TemplateField><ItemTemplate>
                            <asp:Button ID="LinkButton1" Runat="server" OnClientClick="return confirm('Chắc chắn xóa?');"
                                CommandName="Delete" Text="Delete"></asp:Button>
                        </ItemTemplate>
                        </asp:TemplateField>
                    </Columns>
                    <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                    <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
                    <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
                    <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                    <EditRowStyle BackColor="#2461BF" />
                    <AlternatingRowStyle BackColor="White" />
                </asp:GridView>
    		            <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
                            ConflictDetection="CompareAllValues" 
                            ConnectionString="<%$ ConnectionStrings:simDBConnectionString %>" 
                            DeleteCommand="DELETE FROM [tYahooContact] WHERE [YID] = @original_YID AND (([Tel] = @original_Tel) OR ([Tel] IS NULL AND @original_Tel IS NULL))" 
                            InsertCommand="INSERT INTO [tYahooContact] ([YID], [Tel]) VALUES (@YID, @Tel)" 
                            OldValuesParameterFormatString="original_{0}" 
                            SelectCommand="SELECT * FROM [tYahooContact]" 
                            UpdateCommand="UPDATE [tYahooContact] SET [Tel] = @Tel WHERE [YID] = @original_YID AND (([Tel] = @original_Tel) OR ([Tel] IS NULL AND @original_Tel IS NULL))">
                            <DeleteParameters>
                                <asp:Parameter Name="original_YID" Type="String" />
                                <asp:Parameter Name="original_Tel" Type="String" />
                            </DeleteParameters>
                            <UpdateParameters>
                                <asp:Parameter Name="Tel" Type="String" />
                                <asp:Parameter Name="original_YID" Type="String" />
                                <asp:Parameter Name="original_Tel" Type="String" />
                            </UpdateParameters>
                            <InsertParameters>
                                <asp:Parameter Name="YID" Type="String" />
                                <asp:Parameter Name="Tel" Type="String" />
                            </InsertParameters>
                        </asp:SqlDataSource>
    		</td>
    	</tr>
    </table>
    </div>
    </form>
</body>
</html>
